package com.vogue.supplymall.account.shiro.token;

import org.apache.shiro.authc.UsernamePasswordToken;

import com.vogue.supplymall.account.shiro.realm.VerificationCodeRealm;

/**
 * 验证码临时登录的封装Token<br>
 * 
 * @author 崔岳
 *
 */
public class VerificationCodeToken extends UsernamePasswordToken{

	/**
	 * 
	 */
	private static final long serialVersionUID = 5695335647452767911L;
	
	public VerificationCodeToken(final String username, final String password) {
		super(username, password);
	}
	
	public VerificationCodeToken(final String username, final String password, final boolean rememberMe) {
		super(username, password, rememberMe);
	}
	
	public VerificationCodeToken(final String username, final String password, final boolean rememberMe, final String host) {
		super(username, password, rememberMe, host);
	}
	
	@Override
	public Object getPrincipal() {
		// TODO Auto-generated method stub		
		return VerificationCodeRealm.getCacheKey(this.getUsername());
	}
}
